#/!usr/bin/env python
#coding:utf-8

with open(r'd:\epean\python_learn\13.文件io\test.txt', 'w',encoding='utf-8') as f:
    #写入文件
    f.write("test112312\n")
    
with open(r'd:\epean\python_learn\13.文件io\test.txt', 'a',encoding='utf-8') as f:
    #追加写入文件
    f.write("追加写入文件\n")


with open(r'd:\epean\python_learn\13.文件io\test.txt', 'r',encoding='utf-8') as f:
    print(f.read())
